/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Objetos;

/**
 *
 * @author Leandrojpagno
 */
public class Rotacao {
    
    private int k; // Kapa
    private int w; // Omega 
    private int f; // Fi
	
public Rotacao(int k, int w, int f)
{
    this.k = k;
    this.w = w;
    this.f = f;
}
public Rotacao() 
{
    this.k = 0;
    this.w = 0;
    this.f = 0;
}
public float coseno(int angulo)
{
    if (angulo == 90)
        return 0;
    else 
        return (float) Math.cos((Math.PI/180)* angulo);
}
public float seno(int angulo)
{
    if (angulo == 0)
        return 0;
    else 
        return (float) Math.sin((Math.PI/180)* angulo);
}
	
  public float getR11() 
  {
        return (float) ((float) coseno(k)*coseno(f));
}
	
public float getR12()
{
    return  (float) ((float) coseno(k) * seno(f) * seno(w) - seno(k) * coseno(w));
}
	
public float getR13()
{
    return (float)(  seno(k) * seno(w)  + coseno(k) * seno(f) * coseno(w));
}
	
public float getR21() 
{
    return (float) ((float) seno(k) * coseno(f));
}
	
public float getR22() 
{
    return (float)(  coseno(k)  *  coseno(w) + seno(k)  *  seno(f) * seno(w));
}
	
public float getR23()
{
    return (float)(  coseno(w) * seno(k) * seno(f) - coseno(k) * seno(w));
		
}
	
public float getR31() 
{
    return (float)- seno(f);
	
}
	
public float getR32()
{
    return (float) ((float) seno(w) * coseno(f));
}
	
public float getR33()
{
    return (float) ((float) coseno(w) * coseno(f));
}
	
public void setF(int f)
{
    this.f = f;
}
public void setK(int k) 
{
    this.k = k;
}
public void setW(int w) 
{
    this.w = w;
}
public int getF() 
{
    return f;
}
public int getK()
{
    return k;
}
public int getW() 
{
    return w;
}
	
}
